<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Hammerspoon docs: Seal</title>
    <style type="text/css">
      a { text-decoration: none; }
      a:hover { text-decoration: underline; }
      th { background-color: #DDDDDD; vertical-align: top; padding: 3px; }
      td { width: 100%; background-color: #EEEEEE; vertical-align: top; padding: 3px; }
      table { width: 100% ; border: 1px solid #0; text-align: left; }
      section > table table td { width: 0; }
    </style>
    <link rel="stylesheet" href="docs.css" type="text/css" media="screen" />
  </head>
  <body>
    <header>
      <h1><a href="./index.html">docs</a> &raquo; Seal</h1>
      <p>Pluggable launch bar</p>
<p>Download: <a href="https://github.com/Hammerspoon/Spoons/raw/master/Spoons/Seal.spoon.zip">https://github.com/Hammerspoon/Spoons/raw/master/Spoons/Seal.spoon.zip</a></p>
<p>Seal includes a number of plugins, which you can choose to load (see <code>:loadPlugins()</code> below):</p>
<ul>
<li>apps : Launch applications by name</li>
<li>calc : Simple calculator</li>
<li>rot13 : Apply ROT13 substitution cipher</li>
<li>safari_bookmarks : Open Safari bookmarks (this is broken since at least High Sierra)</li>
<li>screencapture : Lets you take screenshots in various ways</li>
<li>urlformats : User defined URL formats to open</li>
<li>useractions : User defined custom actions</li>
<li>vpn : Connect and disconnect VPNs (currently supports Viscosity and macOS system preferences)A</li>
</ul>

      </header>
        <h3>Submodules</h3>
        <ul>
        <li><a href="Seal.plugins.html">Seal.plugins</a></li>
        </ul>
      <h3>API Overview</h3>
      <ul>
        <li>Variables - Configurable values</li>
          <ul>
            <li><a href="#plugin_search_paths">plugin_search_paths</a></li>
            <li><a href="#queryChangedTimerDuration">queryChangedTimerDuration</a></li>
          </ul>
        <li>Methods - API calls which can only be made on an object returned by a constructor</li>
          <ul>
            <li><a href="#bindHotkeys">bindHotkeys</a></li>
            <li><a href="#loadPluginFromFile">loadPluginFromFile</a></li>
            <li><a href="#loadPlugins">loadPlugins</a></li>
            <li><a href="#refreshAllCommands">refreshAllCommands</a></li>
            <li><a href="#refreshCommandsForPlugin">refreshCommandsForPlugin</a></li>
            <li><a href="#show">show</a></li>
            <li><a href="#start">start</a></li>
            <li><a href="#stop">stop</a></li>
            <li><a href="#toggle">toggle</a></li>
          </ul>
      </ul>
      <h3>API Documentation</h3>
        <h4 class="documentation-section">Variables</h4>
          <section id="plugin_search_paths">
            <a name="//apple_ref/cpp/Variable/plugin_search_paths" class="dashAnchor"></a>
            <h5><a href="#plugin_search_paths">plugin_search_paths</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Seal.plugin_search_paths</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Variable</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>List of directories where Seal will look for plugins. Defaults to <code>~/.hammerspoon/seal_plugins/</code> and the Seal Spoon directory.</p>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/Seal.spoon/init.lua#L45">Source/Seal.spoon/init.lua line 45</a></td>
              </tr>
            </table>
          </section>
          <section id="queryChangedTimerDuration">
            <a name="//apple_ref/cpp/Variable/queryChangedTimerDuration" class="dashAnchor"></a>
            <h5><a href="#queryChangedTimerDuration">queryChangedTimerDuration</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Seal.queryChangedTimerDuration</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Variable</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Time between the last keystroke and the start of the recalculation of the choices to display, in seconds.</p>
</td>
              </tr>
              <tr>
                  <th>Notes</th>
                  <td><ul>
<li>Defaults to 0.02s (20ms).</li>
</ul>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/Seal.spoon/init.lua#L37">Source/Seal.spoon/init.lua line 37</a></td>
              </tr>
            </table>
          </section>
        <h4 class="documentation-section">Methods</h4>
          <section id="bindHotkeys">
            <a name="//apple_ref/cpp/Method/bindHotkeys" class="dashAnchor"></a>
            <h5><a href="#bindHotkeys">bindHotkeys</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Seal:bindHotkeys(mapping)</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Method</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Binds hotkeys for Seal</p>
</td>
              </tr>
              <tr>
                  <th>Parameters</th>
                  <td><ul>
<li>mapping - A table containing hotkey modifier/key details for the following (optional) items:<ul>
<li>show - This will cause Seal's UI to be shown</li>
<li>toggle - This will cause Seal's UI to be shown or hidden depending on its current state</li>
</ul>
</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Returns</th>
                  <td><ul>
<li>The Seal object</li>
</ul>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/Seal.spoon/init.lua#L157">Source/Seal.spoon/init.lua line 157</a></td>
              </tr>
            </table>
          </section>
          <section id="loadPluginFromFile">
            <a name="//apple_ref/cpp/Method/loadPluginFromFile" class="dashAnchor"></a>
            <h5><a href="#loadPluginFromFile">loadPluginFromFile</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Seal:loadPluginFromFile(plugin_name, file)</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Method</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Loads a plugin from a given file</p>
</td>
              </tr>
              <tr>
                  <th>Parameters</th>
                  <td><ul>
<li>plugin_name - the name of the plugin, without &quot;seal_&quot; at the beginning or &quot;.lua&quot; at the end</li>
<li>file - the file where the plugin code is stored.</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Returns</th>
                  <td><ul>
<li>The Seal object if the plugin was successfully loaded, <code>nil</code> otherwise</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Notes</th>
                  <td><ul>
<li>You should normally use <code>Seal:loadPlugins()</code>. This method allows you to load plugins
from non-standard locations and is mostly a development interface.</li>
<li>Some plugins may immediately begin doing background work (e.g. Spotlight searches)</li>
</ul>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/Seal.spoon/init.lua#L94">Source/Seal.spoon/init.lua line 94</a></td>
              </tr>
            </table>
          </section>
          <section id="loadPlugins">
            <a name="//apple_ref/cpp/Method/loadPlugins" class="dashAnchor"></a>
            <h5><a href="#loadPlugins">loadPlugins</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Seal:loadPlugins(plugins)</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Method</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Loads a list of Seal plugins</p>
</td>
              </tr>
              <tr>
                  <th>Parameters</th>
                  <td><ul>
<li>plugins - A list containing the names of plugins to load</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Returns</th>
                  <td><ul>
<li>The Seal object</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Notes</th>
                  <td><ul>
<li>The plugins live inside the Seal.spoon directory</li>
<li>The plugin names in the list, should not have <code>seal_</code> at the start, or <code>.lua</code> at the end</li>
<li>Some plugins may immediately begin doing background work (e.g. Spotlight searches)</li>
</ul>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/Seal.spoon/init.lua#L122">Source/Seal.spoon/init.lua line 122</a></td>
              </tr>
            </table>
          </section>
          <section id="refreshAllCommands">
            <a name="//apple_ref/cpp/Method/refreshAllCommands" class="dashAnchor"></a>
            <h5><a href="#refreshAllCommands">refreshAllCommands</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Seal:refreshAllCommands()</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Method</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Refresh the list of commands provided by all the currently loaded plugins.</p>
</td>
              </tr>
              <tr>
                  <th>Parameters</th>
                  <td><ul>
<li>None</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Returns</th>
                  <td><ul>
<li>The Seal object</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Notes</th>
                  <td><ul>
<li>Most Seal plugins expose a static list of commands (if any), which are registered at the time the plugin is loaded. This method is used for plugins which expose a dynamic or changing (e.g. depending on configuration) list of commands.</li>
</ul>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/Seal.spoon/init.lua#L75">Source/Seal.spoon/init.lua line 75</a></td>
              </tr>
            </table>
          </section>
          <section id="refreshCommandsForPlugin">
            <a name="//apple_ref/cpp/Method/refreshCommandsForPlugin" class="dashAnchor"></a>
            <h5><a href="#refreshCommandsForPlugin">refreshCommandsForPlugin</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Seal:refreshCommandsForPlugin(plugin_name)</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Method</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Refresh the list of commands provided by the given plugin.</p>
</td>
              </tr>
              <tr>
                  <th>Parameters</th>
                  <td><ul>
<li>plugin_name - the name of the plugin. Should be the name as passed to <code>loadPlugins()</code> or <code>loadPluginFromFile</code>.</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Returns</th>
                  <td><ul>
<li>The Seal object</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Notes</th>
                  <td><ul>
<li>Most Seal plugins expose a static list of commands (if any), which are registered at the time the plugin is loaded. This method is used for plugins which expose a dynamic or changing (e.g. depending on configuration) list of commands.</li>
</ul>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/Seal.spoon/init.lua#L50">Source/Seal.spoon/init.lua line 50</a></td>
              </tr>
            </table>
          </section>
          <section id="show">
            <a name="//apple_ref/cpp/Method/show" class="dashAnchor"></a>
            <h5><a href="#show">show</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Seal:show(query)</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Method</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Shows the Seal UI</p>
</td>
              </tr>
              <tr>
                  <th>Parameters</th>
                  <td><ul>
<li>query - An optional string to pre-populate the query box with</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Returns</th>
                  <td><ul>
<li>None</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Notes</th>
                  <td><ul>
<li>This may be useful if you wish to show Seal in response to something other than its hotkey</li>
</ul>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/Seal.spoon/init.lua#L234">Source/Seal.spoon/init.lua line 234</a></td>
              </tr>
            </table>
          </section>
          <section id="start">
            <a name="//apple_ref/cpp/Method/start" class="dashAnchor"></a>
            <h5><a href="#start">start</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Seal:start()</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Method</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Starts Seal</p>
</td>
              </tr>
              <tr>
                  <th>Parameters</th>
                  <td><ul>
<li>None</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Returns</th>
                  <td><ul>
<li>The Seal object</li>
</ul>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/Seal.spoon/init.lua#L190">Source/Seal.spoon/init.lua line 190</a></td>
              </tr>
            </table>
          </section>
          <section id="stop">
            <a name="//apple_ref/cpp/Method/stop" class="dashAnchor"></a>
            <h5><a href="#stop">stop</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Seal:stop()</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Method</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Stops Seal</p>
</td>
              </tr>
              <tr>
                  <th>Parameters</th>
                  <td><ul>
<li>None</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Returns</th>
                  <td><ul>
<li>The Seal object</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Notes</th>
                  <td><ul>
<li>Some Seal plugins will continue performing background work even after this call (e.g. Spotlight searches)</li>
</ul>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/Seal.spoon/init.lua#L210">Source/Seal.spoon/init.lua line 210</a></td>
              </tr>
            </table>
          </section>
          <section id="toggle">
            <a name="//apple_ref/cpp/Method/toggle" class="dashAnchor"></a>
            <h5><a href="#toggle">toggle</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Seal:toggle(query)</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Method</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Shows or hides the Seal UI</p>
</td>
              </tr>
              <tr>
                  <th>Parameters</th>
                  <td><ul>
<li>query - An optional string to pre-populate the query box with</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Returns</th>
                  <td><ul>
<li>None</li>
</ul>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/Seal.spoon/init.lua#L252">Source/Seal.spoon/init.lua line 252</a></td>
              </tr>
            </table>
          </section>
  </body>
</html>